package com.norteksoft.erm.model;

import java.sql.Timestamp;

/**
 * 用户登录历史
 * 
 * @hibernate.class table="ERM_SESSIONHISTORY"
 */
public class SessionHistory extends BaseObject {

	private static final long serialVersionUID = -3852587836520691369L;

	private Long OID = new Long(-1);// OID

	private Timestamp loginTime;// 登录时间

	private Timestamp logoutTime;// 注销时间

	private String userName;// 用户帐号

	private String userRealName;// 用户姓名

	private String token;// 会话票据

	// 登录IP
	private String remoteAddr;

	/**
	 * @hibernate.id generator-class="sequence" column="OID" unsaved-value="-1"
	 *               type="long"
	 * @hibernate.generator-param name="sequence" value="ERM_SEQUENCE_FREQUENT"
	 */
	public Long getOID() {
		return OID;
	}

	public void setOID(Long oid) {
		OID = oid;
	}

	/**
	 * @hibernate.property column="LOGINTIME" type="timestamp"
	 * @return Timestamp
	 */
	public Timestamp getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Timestamp loginTime) {
		this.loginTime = loginTime;
	}

	/**
	 * @hibernate.property column="LOGOUTTIME" type="timestamp"
	 * @return Timestamp
	 */
	public Timestamp getLogoutTime() {
		return logoutTime;
	}

	public void setLogoutTime(Timestamp logoutTime) {
		this.logoutTime = logoutTime;
	}

	/**
	 * @hibernate.property column="USERNAME" length="30" type="string"
	 * @return String
	 */
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @hibernate.property column="TOKEN" length="60" type="string"
	 * @return String
	 */
	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	/**
	 * @hibernate.property column="USERREALNAME" length="60" type="string"
	 * @return String
	 */
	public String getUserRealName() {
		return userRealName;
	}

	public void setUserRealName(String userRealName) {
		this.userRealName = userRealName;
	}

	/**
	 * @hibernate.property column="REMOTEADDR" length="40" type="string"
	 * @return String
	 */
	public String getRemoteAddr() {
		return remoteAddr;
	}

	public void setRemoteAddr(String remoteAddr) {
		this.remoteAddr = remoteAddr;
	}

}
